package cc.openhome;
import java.util.Scanner;
import static java.lang.System.out;
import static  java.lang.System.in;
/**
 * Created by xuzhihan on 17/3/16.
 */
public class Guest {
    public static void main(String[] args) {
        ArrayList names =new ArrayList();
        collectNameTo(names);
        System.out.println("访客名单");
        printUpperCase(names);
    }
    static void collectNameTo(ArrayList names){
        Scanner console = new Scanner(in);
        while (true){
            out.print("访客名称");
            String name = console.nextLine();
            if(name.equals("quit")){
                break;
            }

            names.add(name);
        }
    }
    static void printUpperCase(ArrayList names){
        for(int i=0;i<names.size();i++){
            String name = (String) names.get(i);
            System.out.println(name.toUpperCase());
        }
    }
}
